<template>
	<view class="container">
		<view class="khb_box">
			<khb :type="type"></khb>
		</view>


	</view>
</template>

<script>
	import khb from '../../components/khb.vue';
	export default {
		components: {
			khb
		},
		data() {
			return {
				tabIndex: 0,
				tab: [{
						name: '写汇报',
						selectIcon: '/static/homeNav/renwu/07.png',
						Icon: '/static/homeNav/renwu/01.png'
					},
					{
						name: '看汇报',
						selectIcon: '/static/homeNav/renwu/08.png',
						Icon: '/static/homeNav/renwu/04.png'
					}
				],
				form: {
					name: '',
				},
				fileList1: [],
				performance: {},
				type: 0, //0业绩汇报  1任务汇报
				updateId: ''
			};
		},
		onLoad(options) {
			let that = this
			console.log(options, '----options-111--')
			
			if (options.id) {
				this.updateId = options.id
			}
			if (options.type == 0) {
				that.performance = {
					b_id: options.b_id,
					title: options.title,
					type: options.type,
					unit: options.unit,
					reportingTime:options.reportingTime
				}
				// const eventChannel = this.getOpenerEventChannel();
				// // 监听acceptDataFromOpenerPage事件，获取上一页面通过eventChannel传送到当前页面的数据
				// eventChannel.on('acceptDataFromOpenerPage', function(data) {
				// 	console.log(data, '-------')
				// 	that.performance = data
				// })
			}
		},
		methods: {
			gowdrw(index) {
				this.tabIndex = index
			}
		},
		// 页面触底时触发（UniApp 自带生命周期）
		onReachBottom() {
			console.log('cccc')
			// 触底加载更多（排除首次加载、正在加载、无更多数据的情况）
			// if (!this.isLoading && this.loadStatus === 'loadmore') {
			// 	console.log('22')
			// 	this.queryList();
			// }
		},
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 92%;
		margin: 0 4%;
		display: flex;
		flex-direction: column;
	}

	.hbr-box {
		gap: 16rpx;
		flex-flow: wrap;
	}

	.hbr-item {
		border: 1rpx solid #d81e06;
		background-color: rgb(37, 133, 245, 0.1);
		border-radius: 8rpx;
		padding: 4rpx 8rpx;
		box-sizing: border-box;
	}

	.title-box {
		font-size: 32rpx;
		font-weight: 500;
	}

	.btn-submit {
		width: 60%;
		margin: 80rpx 20% 40rpx;
		background-color: #d81e06;
		color: #fff;
		border-radius: 12rpx;
	}

	.btn-box {
		width: 100%;
		position: fixed;
		bottom: 10%;
		left: 0;
	}

	.btn-submit-2 {
		width: 40%;
		margin: 0 30%;
		// background-color: #d81e06;
		// color: #fff;
		border-radius: 12rpx;
	}

	.buttomboxs {
		width: 100%;
		background-color: white;
		display: flex;
		align-items: center;
		justify-content: space-evenly;
		position: fixed;
		z-index: 100;
		bottom: 0;
		left: 0;
		border-top: 1px solid #fff7f6;
		padding: 20rpx 0;
		padding-bottom: constant(safe-area-inset-bottom);
		/* iOS 11.2+ 支持 env()，优先级更高 */
		padding-bottom: env(safe-area-inset-bottom);

		.butnavbox {
			width: 33.3%;

			.navimgs {
				width: 40rpx;
				height: 40rpx;
				margin: 0 auto;
				display: block;
				// background-color: #ff5733;
				padding: 10rpx;
				border-radius: 15rpx;
			}

			.navtxt {
				text-align: center;
				font-size: 26rpx;
				padding-bottom: 15rpx;
			}

			.active {
				color: #d81e06;
			}
		}
	}

	.khb_box {
		flex: 1;
	}

	.u-page__item__slot-icon {
		width: 36rpx;
		height: 36rpx;
	}
</style>
<style>
	page {
		background-color: #fff;
	}
</style>